<?php

class login 
{
public $status;
public function __construct(){
$login=mysql_real_escape_string($_GET['login']);
$password=mysql_real_escape_string($_GET['password']);


if($login=='demo' && $password=='demo' || $_SESSION['login']=="logged"){
$_SESSION['login']="logged";
$this->status="<a href='index.php?action=logout'>Atsijungti</a><br><br>";
}
else {
include_once "template/login.html";
exit(0);  
}



}

} //class endas
?>